home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UNIXTOOL / UNIXLIB37B / !UnixLib37_src_clib_h_stddef < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-09  |  1.2 KB  |  57 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/clib/h/RCS/stddef,v $
  4.  * $Date: 1996/10/30 21:58:58 $
  5.  * $Revision: 1.2 $
  6.  * $State: Rel $
  7.  * $Author: unixlib $
  8.  *
  9.  * $Log: stddef,v $
  10.  * Revision 1.2  1996/10/30 21:58:58  unixlib
  11.  * Massive changes made by Nick Burret and Peter Burwood.
  12.  *
  13.  * Revision 1.1  1996/04/19 21:02:57  simon
  14.  * Initial revision
  15.  *
  16.  ***************************************************************************/
  17.  
  18. #ifndef __STDDEF_H
  19. #define __STDDEF_H
  20.  
  21. /* Signed type of difference of two pointers.  */
  22. #ifndef __PTRDIFF_TYPE__
  23. #define __PTRDIFF_TYPE__ int
  24. #endif
  25. typedef __PTRDIFF_TYPE__ ptrdiff_t;
  26.  
  27.  
  28. /* Unsigned type of sizeof something.  */
  29. #ifndef __size_t
  30. #define __size_t 1
  31. #endif
  32. #ifndef __SIZE_TYPE__
  33. #define __SIZE_TYPE__ unsigned int
  34. #endif
  35. #ifndef size_t
  36. typedef __SIZE_TYPE__ size_t;
  37. #endif
  38.  
  39. /* Wide character type.  */
  40. #ifndef __WCHAR_TYPE__
  41. #define __WCHAR_TYPE__ int
  42. #endif
  43. #ifndef __cplusplus
  44. typedef __WCHAR_TYPE__ wchar_t;
  45. #endif
  46.  
  47. typedef void *ptr_t;
  48.  
  49. #ifndef NULL
  50. #define NULL ((void *)0)
  51. #endif
  52.  
  53. /* Offset of member 'member' in a struct of type 'type'.  */
  54. #define offsetof(type, member) ((size_t) &((type *)0)->member)
  55.  
  56. #endif
  57.